SPM: Declare explicit width based types in secure_partition_boot_info_t structure
authorSughosh Ganu <[email protected]>
Mon, 11 Dec 2017 13:33:19 +0000 (19:03 +0530)
committerSughosh Ganu <[email protected]>
Mon, 22 Jan 2018 17:51:22 +0000 (23:21 +0530)
The secure_partition_boot_info_t structure is used to communicate boot
parameters with the StandaloneMM code executing at S-EL0 through a
shared buffer. Certain data types used for members of this structure
are opaque with their size depending on the toolchain being used.

Declare the members of the structure with explicit width based data
types, which would maintain compatibility across toolchains.

Signed-off-by: Sughosh Ganu <[email protected]>
include/services/secure_partition.h

index 334f76107500227391efcbbfcbba9b5543a86962..93df2a137936d711ea200a0fac76ed518d2bf839 100644 (file)
@@ -35,27 +35,27 @@ extern uintptr_t __SP_IMAGE_XLAT_TABLES_END__;
  * partition.
  */
 typedef struct secure_partition_mp_info {
-       u_register_t            mpidr;
-       unsigned int            linear_id;
-       unsigned int            flags;
+       uint64_t                mpidr;
+       uint32_t                linear_id;
+       uint32_t                flags;
 } secure_partition_mp_info_t;
 
 typedef struct secure_partition_boot_info {
        param_header_t          h;
-       uintptr_t               sp_mem_base;
-       uintptr_t               sp_mem_limit;
-       uintptr_t               sp_image_base;
-       uintptr_t               sp_stack_base;
-       uintptr_t               sp_heap_base;
-       uintptr_t               sp_ns_comm_buf_base;
-       uintptr_t               sp_shared_buf_base;
-       size_t                  sp_image_size;
-       size_t                  sp_pcpu_stack_size;
-       size_t                  sp_heap_size;
-       size_t                  sp_ns_comm_buf_size;
-       size_t                  sp_shared_buf_size;
-       unsigned int            num_sp_mem_regions;
-       unsigned int            num_cpus;
+       uint64_t                sp_mem_base;
+       uint64_t                sp_mem_limit;
+       uint64_t                sp_image_base;
+       uint64_t                sp_stack_base;
+       uint64_t                sp_heap_base;
+       uint64_t                sp_ns_comm_buf_base;
+       uint64_t                sp_shared_buf_base;
+       uint64_t                sp_image_size;
+       uint64_t                sp_pcpu_stack_size;
+       uint64_t                sp_heap_size;
+       uint64_t                sp_ns_comm_buf_size;
+       uint64_t                sp_shared_buf_size;
+       uint32_t                num_sp_mem_regions;
+       uint32_t                num_cpus;
        secure_partition_mp_info_t      *mp_info;
 } secure_partition_boot_info_t;